
<%@ page import="ceramicasoledade.Fornecedor"%>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName"
	value="${message(code: 'fornecedor.label', default: 'Fornecedor')}" />
<title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
	<a href="#show-fornecedor" class="skip" tabindex="-1"><g:message
			code="default.link.skip.label" default="Skip to content&hellip;" /></a>
	<div class="nav" role="navigation">
		<ul>
			<li><a class="home" href="${createLink(uri: '/')}"><g:message
						code="default.home.label" /></a></li>
			<li><g:link class="list" action="list">
					<g:message code="default.list.label" args="[entityName]" />
				</g:link></li>
			<li><g:link class="create" action="create">
					<g:message code="default.new.label" args="[entityName]" />
				</g:link></li>
		</ul>
	</div>
	<div id="show-fornecedor" class="content scaffold-show" role="main">
		<h1>
			<g:message code="default.show.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message" role="status">
				${flash.message}
			</div>
		</g:if>
		<ol class="property-list fornecedor">

			<g:if test="${fornecedorInstance?.nome}">
				<li class="fieldcontain"><span id="nome-label"
					class="property-label"><g:message
							code="fornecedor.nome.label" default="Nome" /></span> <span
					class="property-value" aria-labelledby="nome-label"><g:fieldValue
							bean="${fornecedorInstance}" field="nome" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.bairro}">
				<li class="fieldcontain"><span id="bairro-label"
					class="property-label"><g:message
							code="fornecedor.bairro.label" default="Bairro" /></span> <span
					class="property-value" aria-labelledby="bairro-label"><g:fieldValue
							bean="${fornecedorInstance}" field="bairro" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.cidade}">
				<li class="fieldcontain"><span id="cidade-label"
					class="property-label"><g:message
							code="fornecedor.cidade.label" default="Cidade" /></span> <span
					class="property-value" aria-labelledby="cidade-label"><g:fieldValue
							bean="${fornecedorInstance}" field="cidade" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.cpfCnpj}">
				<li class="fieldcontain"><span id="cpfCnpj-label"
					class="property-label"><g:message
							code="fornecedor.cpfCnpj.label" default="Cpf Cnpj" /></span> <span
					class="property-value" aria-labelledby="cpfCnpj-label"><g:fieldValue
							bean="${fornecedorInstance}" field="cpfCnpj" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.estado}">
				<li class="fieldcontain"><span id="estado-label"
					class="property-label"><g:message
							code="fornecedor.estado.label" default="Estado" /></span> <span
					class="property-value" aria-labelledby="estado-label"><g:fieldValue
							bean="${fornecedorInstance}" field="estado" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.numero}">
				<li class="fieldcontain"><span id="numero-label"
					class="property-label"><g:message
							code="fornecedor.numero.label" default="Numero" /></span> <span
					class="property-value" aria-labelledby="numero-label"><g:fieldValue
							bean="${fornecedorInstance}" field="numero" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.rgInscEst}">
				<li class="fieldcontain"><span id="rgInscEst-label"
					class="property-label"><g:message
							code="fornecedor.rgInscEst.label" default="Rg Insc Est" /></span> <span
					class="property-value" aria-labelledby="rgInscEst-label"><g:fieldValue
							bean="${fornecedorInstance}" field="rgInscEst" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.rua}">
				<li class="fieldcontain"><span id="rua-label"
					class="property-label"><g:message
							code="fornecedor.rua.label" default="Rua" /></span> <span
					class="property-value" aria-labelledby="rua-label"><g:fieldValue
							bean="${fornecedorInstance}" field="rua" /></span></li>
			</g:if>

			<g:if test="${fornecedorInstance?.telefone}">
				<li class="fieldcontain"><span id="telefone-label"
					class="property-label"><g:message
							code="fornecedor.telefone.label" default="Telefone" /></span> <span
					class="property-value" aria-labelledby="telefone-label"><g:fieldValue
							bean="${fornecedorInstance}" field="telefone" /></span></li>
			</g:if>

		</ol>
		<g:form>
			<fieldset class="buttons">
				<g:hiddenField name="id" value="${fornecedorInstance?.id}" />
				<g:link class="edit" action="edit" id="${fornecedorInstance?.id}">
					<g:message code="default.button.edit.label" default="Edit" />
				</g:link>
				<g:actionSubmit class="delete" action="delete"
					value="${message(code: 'default.button.delete.label', default: 'Delete')}"
					onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
			</fieldset>
		</g:form>
	</div>
	<div>
		<g:if test="${fornecedorInstance?.fornecimentos}">
</br></br>
			<span id="fornecimentos-label" class="property-label"><h3><g:message
					code="fornecedor.fornecimentos.label" default="Fornecimentos" /></h3></span>

			<table>
				<thead>
					<tr>

						<g:sortableColumn property="metragem"
							title="${message(code: 'lenha.metragem.label', default: 'Metragem')}" />

						<g:sortableColumn property="valor"
							title="${message(code: 'lenha.valor.label', default: 'Valor')}" />

						<g:sortableColumn property="data"
							title="${message(code: 'lenha.data.label', default: 'Data')}" />

						<th><g:message code="lenha.veiculo.label" default="Veiculo" /></th>

					</tr>
				</thead>
				<tbody>
					<g:each in="${fornecedorInstance.fornecimentos}" var="f">
						<tr>

							<td><g:link action="show" id="${f.id}">
									${f.metragem}
								</g:link></td>

							<td>
								${f.valor}
							</td>

							<td><g:formatDate format="dd/MM/yyyy" date="${f.data}" /></td>

							<td>
								${f.veiculo}
							</td>

						</tr>
					</g:each>
				</tbody>
			</table>
		</g:if>
	</div>
</body>
</html>
